home *** CD-ROM | disk | FTP | other *** search
/ Champak 128 / Vol 128 (Damaged).iso / games / fire_it_.swf / scripts / __Packages / #10.as < prev    next >
Encoding:
Text File  |  2011-03-26  |  9.4 KB  |  332 lines

  1. class ┬º#10┬º extends ┬º#21┬º
  2. {
  3.    static var ┬º#3┬º = false;
  4.    static var ┬º#238┬º = 0;
  5.    static var ┬º#164┬º = 1;
  6.    static var ┬º#172┬º = 2;
  7.    static var ┬º#61┬º = 3;
  8.    static var ┬º#90┬º = 4;
  9.    static var ┬º#197┬º = ["#386","#441","#452","#465","Score"];
  10.    var ┬º#230┬º = 0.046;
  11.    var ┬º#416┬º = 0.046;
  12.    var FPS = 18;
  13.    var ┬º#186┬º = 0;
  14.    var ┬º#7┬º = 0;
  15.    var ┬º#181┬º = 100;
  16.    var ┬º#182┬º = 95;
  17.    var x = 0;
  18.    var y = 0;
  19.    var ┬º#293┬º = 0;
  20.    var ┬º#65┬º = 0;
  21.    var ┬º#84┬º = 0;
  22.    var ┬º#213┬º = 0;
  23.    var ┬º#104┬º = 0;
  24.    var ┬º#105┬º = 0;
  25.    var ┬º#214┬º = 0;
  26.    var x2 = 0;
  27.    var ┬º#156┬º = 0;
  28.    var ┬º#292┬º = 0;
  29.    var x3 = 0;
  30.    var ┬º#212┬º = 0;
  31.    var ┬º#395┬º = 0;
  32.    var ┬º#209┬º = 0;
  33.    var ┬º#210┬º = 0;
  34.    var ┬º#211┬º = 0;
  35.    var ┬º#153┬º = 0;
  36.    var ┬º#154┬º = 0;
  37.    var ┬º#155┬º = 0;
  38.    var ┬º#125┬º = 0;
  39.    var ┬º#126┬º = 0;
  40.    var ┬º#127┬º = 0;
  41.    var ┬º#16┬º = 0;
  42.    var r = 0;
  43.    function ┬º#10┬º()
  44.    {
  45.       super();
  46.    }
  47.    function ┬º#2┬º()
  48.    {
  49.       return "Ball (" + this + ", " + eval("#10")["#197"][this["#7"]] + "):  ";
  50.    }
  51.    function toString()
  52.    {
  53.       return "[Ball " + this + " state: " + eval("#10")["#197"][this["#7"]] + " frame: " + this._currentframe + "/" + this._totalframes + " location: " + this._x + "," + this._y + "]";
  54.    }
  55.    function ┬º#8┬º(┬º#97┬º)
  56.    {
  57.       if(eval("#10")["#3"])
  58.       {
  59.          eval("#0").log(this["#2"]() + "changing to state " + eval("#10")["#197"][┬º#97┬º]);
  60.       }
  61.       if(this["#7"] == ┬º#97┬º)
  62.       {
  63.          return undefined;
  64.       }
  65.       if(┬º#97┬º != eval("#10")["#61"])
  66.       {
  67.          this._alpha = 100;
  68.       }
  69.       switch(┬º#97┬º)
  70.       {
  71.          case eval("#10")["#172"]:
  72.             this["#16"] = 0;
  73.             this["#181"] = _root["#4"]["#9"]._xscale;
  74.             this["#99"]();
  75.             this["#205"]();
  76.             break;
  77.          case eval("#10")["#61"]:
  78.             this["#268"]();
  79.             _root["#4"]["#394"]();
  80.             this["#16"] = 0;
  81.             this["#358"]();
  82.             break;
  83.          case eval("#10")["#90"]:
  84.             this["#268"]();
  85.             _root["#4"].score();
  86.             this["#16"] = 0;
  87.             this["#363"]();
  88.       }
  89.       this["#7"] = ┬º#97┬º;
  90.    }
  91.    function update()
  92.    {
  93.       switch(this["#7"])
  94.       {
  95.          case eval("#10")["#172"]:
  96.             this["#99"]();
  97.             if(this["#103#10"]())
  98.             {
  99.                this["#8"](this["#186"]);
  100.             }
  101.             break;
  102.          case eval("#10")["#61"]:
  103.          case eval("#10")["#90"]:
  104.             if(this["#103#10"]())
  105.             {
  106.                if(eval("#10")["#3"])
  107.                {
  108.                   eval("#0").log(this["#2"]() + "done moving ball for miss or score");
  109.                }
  110.                this["#8"](eval("#10")["#238"]);
  111.                _root["#4"]["#318"]();
  112.             }
  113.             else
  114.             {
  115.                this._alpha -= 8;
  116.             }
  117.       }
  118.    }
  119.    function ┬º#99┬º()
  120.    {
  121.       var _loc2_ = this["#181"] - (this["#181"] - this["#182"]) * this["#16"];
  122.       this._xscale = _loc2_;
  123.       this._yscale = _loc2_;
  124.    }
  125.    function ┬º#268┬º()
  126.    {
  127.       this._xscale = this["#182"];
  128.       this._yscale = this["#182"];
  129.    }
  130.    function ┬º#205┬º()
  131.    {
  132.       if(eval("#10")["#3"])
  133.       {
  134.          eval("#0").log(this["#2"]() + "shooting ball");
  135.       }
  136.       this.swapDepths(_root["#35"]);
  137.       var _loc3_ = 0;
  138.       var _loc7_ = 0;
  139.       var _loc4_ = _root["#4"].getPlayerNetDistance();
  140.       this["#23"] = eval("#257");
  141.       if(_loc4_ < 50)
  142.       {
  143.          this["#23"] *= 1;
  144.       }
  145.       else if(_loc4_ < 75)
  146.       {
  147.          this["#23"] *= 0.6666666666666666;
  148.       }
  149.       else
  150.       {
  151.          this["#23"] *= 0.5;
  152.       }
  153.       this.r = 3.75 / _loc4_;
  154.       if(eval("#5")["#249"])
  155.       {
  156.          this["#23"] = Math.round(this["#23"] / _root["#24"]["#246"]);
  157.       }
  158.       if(eval("#5")["#364"])
  159.       {
  160.          this["#23"] *= 2;
  161.       }
  162.       this["#29"] = Math.abs(_root["#4"]["#9"]["#175"] - _root["#4"]["#9"]["#194"]);
  163.       if(this["#29"] < this["#23"])
  164.       {
  165.          if(eval("#10")["#3"])
  166.          {
  167.             eval("#0").log(this["#2"]() + "made shot, accuracy: " + this["#29"] + "/" + this["#23"]);
  168.          }
  169.          this["#186"] = eval("#10")["#90"];
  170.          if(this["#29"] < this["#23"] / 2)
  171.          {
  172.             this["#206"] = true;
  173.          }
  174.          else
  175.          {
  176.             this["#206"] = false;
  177.          }
  178.       }
  179.       else
  180.       {
  181.          if(eval("#10")["#3"])
  182.          {
  183.             eval("#0").log(this["#2"]() + "missed shot, accuracy: " + this["#29"] + "/" + this["#23"]);
  184.          }
  185.          _loc7_ = -5;
  186.          var _loc5_ = _root["#42"]._width / 2;
  187.          var _loc6_ = _root["#4"]["#9"]._x - _root["#42"]._x;
  188.          if(Math.abs(_loc6_) < 150 * eval("#5").scale)
  189.          {
  190.             if(_loc6_ < 0)
  191.             {
  192.                _loc3_ = _loc5_;
  193.             }
  194.             else
  195.             {
  196.                _loc3_ = - _loc5_;
  197.             }
  198.          }
  199.          else
  200.          {
  201.             _loc3_ = eval("#14").getRandomSign() * _loc5_;
  202.          }
  203.          this["#186"] = eval("#10")["#61"];
  204.       }
  205.       this["#234"](_root["#42"]._x + _loc3_,_root["#42"]._y + _loc7_);
  206.    }
  207.    function ┬º#234┬º(┬º#456┬º, ┬º#457┬º)
  208.    {
  209.       this["#65"] = this._x;
  210.       this["#84"] = this._y;
  211.       this.x3 = ┬º#456┬º;
  212.       this["#212"] = ┬º#457┬º;
  213.       if(eval("#10")["#3"])
  214.       {
  215.          eval("#0").log(this["#2"]() + "computing arc from " + this["#65"] + "," + this["#84"] + " to " + this.x3 + "," + this["#212"]);
  216.       }
  217.       this["#104"] = this["#65"];
  218.       this["#105"] = this["#84"];
  219.       var _loc3_ = this._x - ┬º#456┬º;
  220.       var _loc2_ = this._y - ┬º#457┬º;
  221.       _loc3_ /= 3;
  222.       _loc2_ = (- _loc2_) / 6;
  223.       this["#104"] = this["#65"] - _loc3_;
  224.       this["#105"] = _loc2_;
  225.       this.x2 = this.x3 + _loc3_;
  226.       this["#156"] = _loc2_;
  227.       this["#214"] = this["#292"] = 100;
  228.       this["#125"] = 3 * (this["#104"] - this["#65"]);
  229.       this["#153"] = 3 * (this.x2 - this["#104"]) - this["#125"];
  230.       this["#209"] = this.x3 - this["#65"] - this["#125"] - this["#153"];
  231.       this["#126"] = 3 * (this["#105"] - this["#84"]);
  232.       this["#154"] = 3 * (this["#156"] - this["#105"]) - this["#126"];
  233.       this["#210"] = this["#212"] - this["#84"] - this["#126"] - this["#154"];
  234.       this["#127"] = 3 * (this["#214"] - this["#213"]);
  235.       this["#155"] = 3 * (this["#292"] - this["#214"]) - this["#127"];
  236.       this["#211"] = this["#395"] - this["#213"] - this["#127"] - this["#155"];
  237.    }
  238.    function ┬º#448┬º(┬º#474┬º, ┬º#475┬º, speed)
  239.    {
  240.       if(┬º#474┬º < ┬º#475┬º)
  241.       {
  242.          ┬º#474┬º += speed;
  243.          if(┬º#474┬º > ┬º#475┬º)
  244.          {
  245.             ┬º#474┬º = ┬º#475┬º;
  246.          }
  247.       }
  248.       else if(┬º#474┬º > ┬º#475┬º)
  249.       {
  250.          ┬º#474┬º -= speed;
  251.          if(┬º#474┬º < ┬º#475┬º)
  252.          {
  253.             ┬º#474┬º = ┬º#475┬º;
  254.          }
  255.       }
  256.       return ┬º#474┬º;
  257.    }
  258.    function ┬º#103#10┬º()
  259.    {
  260.       if(this["#7"] == eval("#10")["#238"])
  261.       {
  262.          eval("#0").log(this["#2"]() + "can\'t move ball in still state");
  263.          return true;
  264.       }
  265.       this["#16"] += this.r;
  266.       if(this["#16"] >= 1)
  267.       {
  268.          this["#16"] = 1;
  269.       }
  270.       var _loc2_ = this["#16"] * this["#16"];
  271.       var _loc3_ = this["#16"] * _loc2_;
  272.       this.x = this["#209"] * _loc3_ + this["#153"] * _loc2_ + this["#125"] * this["#16"] + this["#65"];
  273.       this.y = this["#210"] * _loc3_ + this["#154"] * _loc2_ + this["#126"] * this["#16"] + this["#84"];
  274.       this["#293"] = this["#211"] * _loc3_ + this["#155"] * _loc2_ + this["#127"] * this["#16"] + this["#213"];
  275.       this._x = this.x;
  276.       this._y = this.y;
  277.       if(this["#16"] >= 1)
  278.       {
  279.          return true;
  280.       }
  281.       return false;
  282.    }
  283.    function ┬º#358┬º()
  284.    {
  285.       if(eval("#10")["#3"])
  286.       {
  287.          eval("#0").log(this["#2"]() + "throw ball (miss)");
  288.       }
  289.       this.swapDepths(_root["#35"]);
  290.       var _loc3_ = undefined;
  291.       var _loc4_ = _root["#4"]["#9"]._x - _root["#42"]._x;
  292.       if(Math.abs(_loc4_) < 200 * eval("#5").scale)
  293.       {
  294.          if(_loc4_ < 0)
  295.          {
  296.             _loc3_ = eval("#14").getRandom(_root["#42"]._x,_root["#42"]._x * 1.5);
  297.          }
  298.          else
  299.          {
  300.             _loc3_ = eval("#14").getRandom(_root["#42"]._x * 0.5,_root["#42"]._x);
  301.          }
  302.       }
  303.       else
  304.       {
  305.          _loc3_ = eval("#14").getRandom(_root["#42"]._x * 0.5,_root["#42"]._x * 1.5);
  306.       }
  307.       var _loc5_ = eval("#14").getRandom(Bounds.getYMin() * 1.25,Bounds.getYMax() * 0.75);
  308.       eval("#1").getInstance()["#20"](eval("#1")["#277"]);
  309.       this.r = this["#230"] * 1.6;
  310.       this["#234"](_loc3_,_loc5_);
  311.    }
  312.    function ┬º#363┬º()
  313.    {
  314.       if(eval("#10")["#3"])
  315.       {
  316.          eval("#0").log(this["#2"]() + "drop ball (score)");
  317.       }
  318.       this.swapDepths(_root["#35"]);
  319.       this.r = this["#230"] * 1.5;
  320.       this["#65"] = this._x;
  321.       this["#84"] = this._y;
  322.       this["#209"] = this["#210"] = this["#211"] = 0;
  323.       this["#153"] = this["#154"] = this["#155"] = 0;
  324.       this["#125"] = this["#127"] = 0;
  325.       this["#126"] = Bounds.getYMin() * 1.15 - this._y;
  326.    }
  327.    function ┬º#409┬º()
  328.    {
  329.       eval("#1").getInstance()["#20"](eval("#1")["#195"]);
  330.    }
  331. }
  332.